package chapter01;

public class Test25_TwoDimensional {
    public static void main(String[] args) {
        //定义一个二维数组
        int[][] a = new int[4][5];
        //遍历数组输出
        extracted(a);
        int[][] b = new int[4][];
        b[0] = new int[]{1,2,3};
        b[1] = new int[]{4,5};
        b[2] = new int[]{6,7,8};
        b[3] = new int[]{9,10};
        extracted(b);
        int[][] c = {{1,2},{300},{4,5,6}};
        extracted(c);
    }
    private static void extracted(int[][] a) {
        for(int i = 0; i< a.length; i++){
            for(int j = 0; j< a[i].length; j++){
                System.out.print(a[i][j]+"\t");
            }
            System.out.println();
        }
    }
}
